import React from "react";
import { MenuButton } from "./Menu";
import { Item, Section } from "@react-stately/collections";
import { View } from "react-native";

export const MeduSectionDemo = () => {
  return (
    <View>
      <MenuButton
        marginBottom={430} 
        label="MenuSectionDemo Actions"
        onAction={console.log}
        selectionMode="multiple"
        closeOnSelect={true}
        onSelectionChange={console.log}
      >
        <Section title="Section 1">
          <Item key="copy">Copy</Item>
          <Item key="cut">Cut</Item>
          <Item key="paste">Paste</Item>
        </Section>
        <Section title="Section 2">
          <Item key="copy 2">Copy</Item>
          <Item key="cut 2">Cut</Item>
          <Item key="paste 2">Paste</Item>
        </Section>
      </MenuButton>
    </View>
  );
};


export const MeduDemo = () => {
  return (
    <View>
      <MenuButton label="MenuDemo Actions" marginBottom={220} onAction={console.log} 
        onSelectionChange={console.log}>
        <Item key="copy">Copy</Item>
        <Item key="cut">Cut</Item>
        <Item key="paste">Paste</Item>
      </MenuButton>
    </View>
  );
};

